/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - system/task
// Copyright( c) 2014.  All Rights Reserved
//
// File:		AESysTask.h
// Author:		Gianluca Belardelli
// Date:		03/04/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AESYSTASK_H_
#define _AESYSTASK_H_

class AESysTask : public AEThreadWorkItem
{
// Members
public:
	AEEvent			*m_hWorkCompleted;
    AESystemTaskI	*m_lpSystemTask;
    AEFLOAT32		m_fDeltaTime;
	void			*m_lpCompletionUserData;

    AEITaskManager::AEJobCompletionFunction m_lpfnJobCompletionFunction;

// Methods
public:
    /// <summary cref="SystemTaskWrapper::Process">
	///	This method calls the <c>Update</c> method of the associated <c>ISystemTask</c>
	/// with some instrumentation to record the time taken for the call.
	/// </summary>
	void Process( void );

	/// <summary cref="SystemTaskWrapper::SetStatus">
	/// <c>TaskManagerTP</c> calls this method to initiate the call to the associated
	/// completion fucntion.
	/// </summary>
	/// <param name="inStatus">the new status</param>
    void SetStatus( AEThreadWorkItem::AEWorkItemStatus inStatus );

	AEBOOL32 IsDynamicallyAllocated( void ) { return 0; }

};

#endif // _AESYSTASK_H_
